<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="zh-cn">
    <head>


        <!-- Bootstrap -->
        <include file="Include/css" />
        <link rel="stylesheet" href="__STATICS__/css/permission.css"/>
        <link href="__STATICS__/css/sweet-alert.css" rel="stylesheet">
        <script type="text/javascript" src="__STATICS__/js/sweet-alert.min.js"></script>
        <title>权限设置</title>

    </head>
    <body>
        <include file="Include/nav_top" />
        <div class="container clearfix" id="left_menu_wraper" >
            <include  file="Include/menu_left" />
            <div id="right-content">
                <div id="right-content-inner">
                    <ul class="breadcrumb">
                        <span>您的位置：</span>
                        <li><a href="{:U('CNEPAdmin/Index/index')}">首页</a> </li>
                        <li class="active">权限设置</li>
                    </ul>


                    <div class="alert alert-info  alert-dismissible" role="alert">

                        <!--关闭按钮-->
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <!--内容-->
                        <strong>温馨提示：</strong> 在这里可以设置指定角色的权限
                    </div>

                    <div class="permission_wraper row">
                        <div class="col-md-12">
                            <form class="form-inline ">
                                <div class="form-group ">
                                    <label class="padding5" >系统角色：</label>
                                    <select id="roleid" class="form-control" >
                                        <option value="-1"> 选择角色</option>
                                        <volist name="sysRoleList" id="vo" >
                                            <option value="{$vo.roleID}"> {$vo.roleName}</option>
                                        </volist>
                                    </select>
                                </div>

                                <a href="javascript:void(0);" id="save_role_priv" class="btn btn-orange pull-right">保存修改</a>
                            </form>
                        </div>

                        <div class="col-md-12">

                            <div class="col-md-12">

                                <volist name="mList" id="vo" >
                                    
                                    <div class="col-md-12 border pos_relative mt10 padding10 marginbt20 block_permission" data-id="{$vo.privCode}">

                                        <strong class="block_title text-orange">
                                            {$vo.privName}
                                        </strong>
                                        
                                        <volist name="vo.list" id="voSub" >
                                            
                                            <div class="col-md-6 padding5 pull-left block_permission_inner" data-id="{$voSub.privID}" data-code="{$voSub.privCode}" >
                                                <strong class="radio-inline radio radio_title">
                                                    {$voSub.privName} :
                                                </strong>
                                                <label class="radio-inline">
                                                    <input class="priv_" type="radio" checked="true" name="priv_{$voSub.privID}"  value="0">无权限
                                                </label>

                                                <label class="radio-inline">
                                                    <input class="priv_" type="radio" name="priv_{$voSub.privID}"  value="2">可读写
                                                </label>

                                                <if condition="$voSub['privCode'] eq 'od'" >
                                                <label class="radio-inline">
                                                    <input class="priv_" type="radio" name="priv_{$voSub.privID}"  value="1" id="onlyread">可读
                                                </label><label class="radio-inline">
                                                    商品id：<input type="text" name="" value="" id="other"/>用英文,号分隔可以添加多个商品id
                                                </label>
                                                <else />
                                                <label class="radio-inline">
                                                    <input class="priv_" type="radio" name="priv_{$voSub.privID}"  value="1">可读
                                                </label>
                                                </if>

                                            </div>
                                            
                                        </volist>

                                    </div>
                                    
                                </volist>

                            </div>

                        </div>


                    </div>

                </div>

            </div>
        </div>
        <script type="text/javascript">
                var img_url = "__STATICS__/images";
                var load_url = "{:U('CNEPAdmin/PrivModule/getPrivByRoleID')}";
                var post_url = "{:U('CNEPAdmin/PrivModule/saveSysRolePriv')}";
        </script>
        <include file="Include/script" />
        <script src="__STATICS__/js/admin/hzAjax.js" type="text/javascript"></script>
        <script src="__STATICS__/js/admin/sysRoleDetail.js" type="text/javascript"></script>
        
        <script>
            /*菜单展开及高亮*/
            $(function () {
                $('.system').addClass('open');
                $('#system3').addClass('active');
                /*$('.onlyread').click( function () {
                    if($("input[name='newsletter']"))
                });*/
            });


        </script>
    </body>
</html>